package model;

import org.bson.types.ObjectId;

import com.google.code.morphia.dao.BasicDAO;

import entity.Image;

public class ImageModel extends BasicDAO<Image, ObjectId> {
	public ImageModel() {
		super(DBConnection.getMongo(), DBConnection.getMorphia(), DBConnection
				.getDatabase());
	}

	public Image findByURL(String url) { 
		return ds.find(Image.class, "url", url).get();
	}
}